﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace D.WPF.MVVM.Messaging
{
    public interface IExecuteWithObject
    {
        /// <summary>The target of the WeakAction.</summary>
        object Target { get; }

        /// <summary>Executes an action.</summary>
        /// <param name="parameter">A parameter passed as an object,
        /// to be casted to the appropriate type.</param>
        void ExecuteWithObject(object parameter);

        /// <summary>
        /// Deletes all references, which notifies the cleanup method
        /// that this entry must be deleted.
        /// </summary>
        void MarkForDeletion();
    }
}
